<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	    		xmlns:ui="http://java.sun.com/jsf/facelets"
	  			xmlns:h="http://java.sun.com/jsf/html"
	  			xmlns:p="http://primefaces.prime.com.tr/ui"
	  			xmlns:f="http://java.sun.com/jsf/core"
	  			xmlns:sf="http://www.springframework.org/tags/faces"	  			
				template="/WEB-INF/layouts/standard.xhtml">

<ui:define name="content">

<div class="section">
	<h2>Reporte de Iva</h2>
		<ui:fragment id="messages">
		<div id="messagesInsertionPoint">
			<p:messages errorClass="errors" />
		</div>
	</ui:fragment>
	<h:form id="reportForm">
		<fieldset>
		<div class="field">
			<div  class="label">Desde : </div>
			<h:inputText style="width:40%" id="desde" value="#{criteria.fromString}"/>
			<script type="text/javascript">
				  Calendar.setup({
				        inputField     :    "reportForm:desde",
				        ifFormat       :    "%d/%m/%Y",
				        showsTime      :    false,
				        timeFormat     :    "24",
				    });
			</script>
		</div>
		<div class="field">
			<div  class="label">Hasta : </div>
			<h:inputText style="width:40%" id="hasta" value="#{criteria.toString}"/>
			<script type="text/javascript">
				  Calendar.setup({
				        inputField     :    "reportForm:hasta",
				        ifFormat       :    "%d/%m/%Y",
				        showsTime      :    false,
				        timeFormat     :    "24",
				    });
			</script>
		</div>	
		</fieldset>
		
		<div class="buttonGroup" style="align:right">
				<br />
				<br />
				<sf:commandButton id="run" processIds="*" onclick="dialog.show();" value="Generar Reporte" action="run"/>
				<sf:commandButton id="cancel" value="Volver" action="volver"/>
		</div>
		
		<p:dialog header="Reportes" widgetVar="dialog" modal="true"
					fixedCenter="true"   width="400px">
					<b> Generando Reporte de Iva... </b>
					<br/>
					<br/>
				<div class="buttonGroup" style="align:right">
					<sf:commandButton modal="true" effect="FADE" id="cancel" close="false" value="Cerrar" onclick="dialog.close();" action="volver"/>
				</div>
		</p:dialog>
	</h:form>
</div>

</ui:define>
</ui:composition>